<template>
  <div id="app">
    <div class="center" v-show="$route.meta.istrun">
      <nav>
        <div class="logo">
          <div class="logo-img">
            <img
              src="https://s1.hdslb.com/bfs/manga-static/manga-mobile/static/img/827fd99e14bb260.png"
              alt=""
            />
          </div>
        </div>
        <router-link to="/" class="recommend" exact>
          <span>推荐</span>
        </router-link>
        <router-link to="/ranking" class="ranking">
          <span>排行</span>
        </router-link>
        <router-link to="/classify" class="classify">
          <span>分类</span>
        </router-link>
        <a
          class="download"
          href="https://manga.bilibili.com/eden/download-jumping.html?route_target=bilicomic%3A%2F%2Fdetail%2F26470%3Fh5awaken%3Db3Blbl9hcHBfZnJvbV90eXBlPWg1XyZvcGVuX2FwcF91cmw9aHR0cHM6Ly9tYW5nYS5iaWxpYmlsaS5jb20vbS9kZXRhaWwvbWMyNjQ3MA%253D%253D"
          >下载哔哩哔哩漫画</a
        >
      </nav>
    </div>
    <router-view />
  </div>
</template>

<style lang="scss">
body {
  margin: 0;
  padding: 0;
  font-family: "微软雅黑";
}
.center {
  width: 100%;
  position: sticky;
  top: 0;
  background-color: #fff;
  border-bottom: 1px solid #ddd;
  z-index: 9999;

  nav {
    display: flex;
    width: 375px;
    margin: 0 auto;

    .logo {
      width: 34px;
      padding-left: 20px;

      .logo-img {
        width: 26px;
        height: 26px;
        margin-right: 8px;
        margin-top: 11px;

        img {
          width: 100%;
        }
      }
    }
    .recommend,
    .ranking,
    .classify {
      width: 30px;
      height: 45px;
      margin: 0 8px;
      font-size: 15px;
      line-height: 45px;
      color: #90959b;
    }
    .download {
      color: #fff;
      background-color: #fb7299;
      font-size: 13px;
      height: 30px;
      line-height: 28px;
      padding: 0 16px;
      border-radius: 1.25rem;
      margin-top: 7px;
      margin-left: 31px;
    }
    .router-link-active {
      color: #fb7299;
    }
  }
}
</style>
